#ifndef EXTRACTWORKER_H
#define EXTRACTWORKER_H

#include <QObject>
#include <QString>
#include <QStringList>

class ExtractWorker : public QObject
{
    Q_OBJECT

public:
    explicit ExtractWorker(QObject *parent = nullptr);
    void setParameters(const QString &path, const QStringList &languages, const QString &savePath);

public slots:
    void process();

signals:
    void progressChanged(int value, const QString &fileName);
    void totalFilesChanged(int total);
    void finished(bool success);
    void error(const QString &message);

private:
    QString m_path;
    QStringList m_languages;
    QString m_savePath;
    QStringList m_processedCode;
    
    int countFiles(const QString &path);
    void collectFiles(const QString &path);
};

#endif // EXTRACTWORKER_H 